using System;
using System.Data;
using System.Data.SqlClient;
namespace DAL
{
	/**
	 * Classname : Nguoidung
	 * Version information :1.0
	 * Date  :26-09-2006
	 * Copyright notice : 
	 */
	
	public class DALevel : DbObject
	{
        protected SqlConnection connec;

        public DALevel(SqlConnection Connection)
		{
            connec = Connection;
		}	
		// Kiem tra mat khau nguoi dung
        public DataSet LayDanhSachLevel()
		{
			// create the parameter
            DataSet dsLevel = RunProcedure("sp_Levels_loadLayDanhSachLevel", "TB_Level", connec);
            return dsLevel;
		}
        // return only the record with the specified ID!!!!!!!!!!!
        public DataRow LayDanhSachLevelID(int LevelID)
        {
            // create the parameter
            SqlParameter[] parameters = { new SqlParameter("@ID", SqlDbType.Int, 4) };
            parameters[0].Value = LevelID;

            using (DataSet dsLevel = RunProcedure("sp_Levels_loadLayDanhSachLevelID", parameters, "TB_Level", connec))
            {
                return dsLevel.Tables[0].Rows[0];
            }
        }

	}
}